package cn.codeforfun.controller;

import cn.codeforfun.service.ConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Package cn.codeforfun.controller
 * Project docker-testtest
 * Company  PACTERA
 * Author bin.wang
 * Created on 2017/3/22 15:50
 * version 1.0.0
 */
@RestController
@RequestMapping("/consumer")
public class ConsumerController {
  @Autowired
  private ConsumerService consumerService;

  @RequestMapping(value = "/add", method = RequestMethod.GET)
  public String add(@RequestParam("a") Integer a, @RequestParam("b") Integer b) {
    return consumerService.add(a, b);
  }
}
